package com.hery.pojo.alertManager;

import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * Sentry 告警内容实体类，保存发送到 AlertManager 的数据
 */
@Data
@Builder
public class SentryAlertData extends AlertManagerData {

    private SentryLabels labels;
    private SentryAnnotations annotations;

    @Data
    @Builder
    public static class SentryLabels extends Labels {

        private String alertName;
        private String packageName;
        private String eventId;
        private String link;
        private String applicationName;
        private String applicationId;
        private Route route;
        private final String date = LocalDateTime.now().toString();

    }

    @Data
    @Builder
    public static class SentryAnnotations extends Annotations {

        private String info;
        private String summary;

    }

}
